<!DOCTYPE html>
<html lang="zh-CN">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta http-equiv="X-UA-Compatible" content="ie=edge" />
    <title>Document</title>
  </head>

  <body>
    <div id="app">
      <!-- 1.遍历对象中，第一个获取的是value -->
      <ul>
        <li v-for="value in info">{{value}}</li>
      </ul>

      <!-- 2.获取key和value 格式：(value, key) -->
      <ul>
        <li v-for="(value, key) in info">{{value}}-{{key}}</li>
      </ul>

      <!-- 3.获取key和value和index 格式：(value, key, index) -->
      <ul>
        <li v-for="(value, key, index) in info">{{value}}-{{key}}-{{index}}</li>
      </ul>
    </div>

    <script src="../js/vue.js"></script>
    <script>
      const app = new Vue({
        el: '#app',
        data: {
          info: {
            name: '浮幻',
            age: 17,
            xq: '前端'
          }
        },
        methods: {}
      })
    </script>
  </body>
</html>
